package com.cherry.entity;

import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * @create 2020-09-02 10:08 下午
 * @function:
 **/
@Data
@Accessors(chain = true)
public class ResultData<T> implements Serializable {
    private int code = Code.SUCCESS; // 返回的状态码,默认成功
    private String msg; // 返回的信息
    private T Data; // 返回的数据

    /**
     * 返回的状态码的枚举
     */
    public static interface Code {
        int SUCCESS = 0;
        int ERROR = -1;
    }
}
